package cn.bdqn.service.questionBank;

import cn.bdqn.dao.questionBank.TestPaperDao;
import cn.bdqn.dao.questionBank.TestPaperTypeDao;
import cn.bdqn.pojo.questionBank.TestPaperType;
import cn.bdqn.utils.Json;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("testPaperTypeService")
public class TestPaperTypeService {

    @Autowired
    private TestPaperTypeDao testPaperTypeDao;

    /**
     * 查询所有试卷类型
     * @return
     */
    public Json selectAllTestPaperType(){
        List<TestPaperType> testPaperTypeList = testPaperTypeDao.selectList(null);
        if(testPaperTypeList == null){
            return Json.fall("试卷类型获取失败");
        }
        return Json.ok(testPaperTypeList);
    }
}
